% construct diffusion and random force part
function rest = randomX(t,y,num)

load('alphas');
load('msval');
load('sigma');


row=size(alphas,1); colum=size(alphas,2);
if row >=2
    rest(row)=0;
end
dt1=0.5/num; 
t2courseindex=floor((t+0.5*dt1)/dt1)+1;
rest(1)=-1/2*sig(t2courseindex,1).^2;

rest(2:row)=sig(t2courseindex,1)*msval(t2courseindex,1:colum);

rest=rest';




